package cn.edu.njnu.opengmpback.recommendation.controller;

import cn.edu.njnu.opengmpback.common.utils.JsonResult;
import cn.edu.njnu.opengmpback.recommendation.dto.request.RecommendationRequestDTO;
import cn.edu.njnu.opengmpback.recommendation.dto.response.RecommendationResponseDTO;
import cn.edu.njnu.opengmpback.recommendation.service.RecommendationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/chatBot")
public class RecommendationController {
    @Autowired
    private RecommendationService recommendationService;

    @ApiOperation("获取推荐列表")
    @PostMapping("/getRecommendation")
    public JsonResult getRecommendation(@RequestBody RecommendationRequestDTO requestDTO) {
        return recommendationService.getRecommendation(requestDTO);
    }

}
